# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>

pkgname=python-osc-lib
pkgver=2.9.0
_commit=3f47018de8d5f7a83425e1d2d08ce2e3c7a33534
pkgrel=1
pkgdesc="OpenStackClient Library"
arch=('any')
url="https://docs.openstack.org/osc-lib/latest/"
license=('Apache')
depends=('python-pbr' 'python-cliff' 'python-keystoneauth1' 'python-openstacksdk' 'python-oslo-i18n'
         'python-oslo-utils' 'python-simplejson' 'python-stevedore')
makedepends=('git' 'python-setuptools')
checkdepends=('python-oslotest' 'python-requests-mock' 'python-stestr' 'python-testrepository'
              'python-testtools')
source=("git+https://github.com/openstack/osc-lib.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd osc-lib
  python setup.py build
}

check() {
  cd osc-lib
  stestr run
}

package() {
  cd osc-lib
  python setup.py install --root="$pkgdir" --optimize=1
}
